<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" 
	+ request.getServerPort() + path + "/";
%>
<html>
<head>
<base href="<%=basePath%>"/> <!-- 设置页面的基本路径，页面所有资源引入和页面跳转都济源bathPath -->

<link rel="stylesheet" type="text/css" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" />
<script type="text/javascript" src="lib/jquery/1.11.3/jquery.min.js"></script>
<script type="text/javascript" src="lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript">
	/* zTree的设置对象 */
	var setting = {
		data:{
			/* 设置支持简单json格式数据 */
			simpleData:{
				enable:true
			}
		},
		/* 设置是否支持复选框 */
		check: {
			enable: true
		}
	}
	
	/* zTree显示的数据  */
	var zNodes = [
		{id:1, pId:0, name: "管理员管理", open:true},
		{id:11, pId:1, name: "管理员操作", open:true},
		{id:111, pId:11, name: "管理员列表"},
		{id:112, pId:11, name: "添加管理员"},
		{id:113, pId:11, name: "删除管理员"},
		{id:114, pId:11, name: "修改管理员"},
		{id:12, pId:1, name: "角色管理"},
		{id:13, pId:1, name: "权限管理"},
		{id:2, pId:0, name: "系统管理", open:true},
		{id:21, pId:2, name: "基础数据管理"}
	];
	
	/* 初始化zTree */
	$(function(){
		$.fn.zTree.init($("#permissionTree"), setting, zNodes);
	});
</script>

<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<ul id="permissionTree" class="ztree"></ul>
</body>
</html>